/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ivanbiz.workflow;

import java.util.List;

/**
 *
 * @author User
 */
public class WorkflowServiceImpl implements WorkflowService{
    private WorkflowDAO workflowDAO;

    public void setWorkflowDAO(WorkflowDAO workflowDAO) {
        this.workflowDAO = workflowDAO;
    }
    
     public void saveWorkflow(Workflow workflow) throws Exception {
        this.workflowDAO.save(workflow);
    }

    public void deleteWorkflow(Workflow workflow) throws Exception {
        this.workflowDAO.delete(workflow);
    }

    public void updateWorkflow(Workflow workflow) throws Exception {
        this.workflowDAO.update(workflow);
    }

    public List loadAll() throws Exception {
        return this.workflowDAO.getAll(Workflow.class);
    }

    public Workflow loadById(long id) throws Exception {
        return (Workflow)this.workflowDAO.load(Workflow.class, id);
    }
    
}
